package org.hgvc.webapp.ets.spring.service;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;

import org.hgvc.webapp.ets.bo.AdvancePayment;
import org.hgvc.webapp.ets.bo.Agreement;
import org.hgvc.webapp.ets.bo.CreditNote;
import org.hgvc.webapp.ets.bo.Invoice;
import org.hgvc.webapp.ets.bo.InvoiceDtl;
import org.hgvc.webapp.ets.bo.Member;
import org.hgvc.webapp.ets.bo.MemberInd;
import org.hgvc.webapp.ets.bo.MemberInstallmentPlan;
import org.hgvc.webapp.ets.bo.Payment;
import org.hgvc.webapp.ets.bo.XSInvoiceType;
import org.hgvc.webapp.ets.jsf.beans.finance.CreditNoteInfoBean;
import org.hgvc.webapp.ets.jsf.beans.finance.MemberInvListingInfoBean;
import org.hgvc.webapp.ets.jsf.beans.finance.PaymentInfoBean;
import org.jocsb.base.bo.User;
import org.jocsb.base.exception.BaseException;


public interface FinanceService extends Serializable{
	public List<InvoiceDtl> getInvoiceDtlListByMemberId(String memberId)throws BaseException;
	public AdvancePayment getAdvancePaymentByMemberId(String memberId)throws BaseException;
	public Double getInvoiceCollectedAmountByMemberId(String memberId)throws BaseException;
	public Double getInvoiceAmountByMemberId(String memberId)throws BaseException;
	public Invoice generateInvoiceForMemberInd(MemberInd memberInd,MemberInstallmentPlan memberInstallmentPlan,User user)throws BaseException;
	public String getDocumentNo(String type)throws BaseException;
	public Object[] getMemberPaymentInfoByPaymentId(String paymentId) throws BaseException;
	public void memberDepositPaymentClearance(Member member,Agreement agreement,Payment payment,User user,String password,String reason,String actionNo,List<InvoiceDtl> list, boolean addNewAgreementForExistMember)throws BaseException;
	public void memberDepositPaymentRejection(Member member,Agreement agreement,Payment payment,User user,String password,String reason,String actionNo)throws BaseException;
	public CreditNote prospectRefundApproval(List<Payment> list,Member member,User user,double amt)throws BaseException;
	public void approveNewAgreement(Member member,Agreement agreement,Payment payment,User user,String reason,String actionNo)throws BaseException;
	public void memberPaymentClearance(Member member,Agreement agreement,Payment payment,User user,String password,String reason,String actionNo,List<InvoiceDtl> list)throws BaseException;
	
	public List<MemberInvListingInfoBean> getMemberInvListingInfoBean(String memberSearch) throws BaseException;
	public List<MemberInvListingInfoBean> getInvListByAgreementId(String agreementId) throws BaseException;
	public HashMap getFinListInvHm(String agreementId) throws BaseException;
	public List<AdvancePayment> getAdvancePaymentListByAgreementId(String memberId)throws BaseException;
	public Double getAdvancePaymentAmtByAgreementId(String memberId) throws BaseException;
	public List<XSInvoiceType> getInvoiceTypeList() throws BaseException;
	public void saveInvoice(Invoice invoice, List<InvoiceDtl> invDtlList) throws BaseException;
	public void saveCreditNote(List<CreditNoteInfoBean> creditNoteList, User user) throws BaseException;
	public void savePayment(Payment payment, List<PaymentInfoBean> paymentInfoList, Double paymentAmt, User user, String actionNo) throws BaseException;
	public void saveAdvancePayment(Payment payment, List<PaymentInfoBean> paymentInfoList, User user) throws BaseException;
	
	public void autoSuspendUserAccount()throws BaseException;
	List<Agreement> getValidAgreement(String memberId) throws Exception;
}
